<?php
namespace App\Admin\Models;
use Common\BaseModel;
use Common\Tree;

class BShopRule extends BaseModel
{
    public $res;
    public $expire;

    public function initialize()
    {
        parent::initialize();
        $this->setSource('b_shop_rule');
    }

    /**
     * 获取店铺权限列表
     */
    public function shopRuleList(){
        $condtions="is_show=0";
        $get_list = $this->find(array(
            $condtions
        ))->toarray();
        $Tree = new Tree();
        $get_list = $Tree->array2tree($get_list,"name","id","parentId");
        return $get_list;
    }

}
